import { handleActions } from 'redux-actions'
import {
  INIT_MAIN_COMPANY_TYPE,
  UPDATE_MAIN_COMPANY_TYPE
} from './type'

const Schema = {
  showEmpty: false,
  networkerror: false
}

export default handleActions(
  {
    [INIT_MAIN_COMPANY_TYPE] (state, action) {
      return {
        ...Schema
      }
    },
    [UPDATE_MAIN_COMPANY_TYPE] (state, action) {
      return {
        ...state,
        ...action.payload
      }
    }
  },
  Schema
)
